check if a file exists rust

255

check if a file exists rust -

use std::path::Path;

fn main() {
    println!("{}", Path::new("/etc/hosts").exists());
}

Comments

Submit
0 Comments